package testproj2;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.*;

public class MainClass {
	public void MainFormInit() {
		
	}
	
	public static void main (String [] args) {
	//Shell dialog = new Shell (shell);
	//dialog.setText ("Dialog");
	//dialog.setSize (200, 200);
	//dialog.open ();
		Display display = new Display();
		final Shell mainShell = new Shell(display);
		final Shell optionShell = new Shell(display);
		mainShell.setText("Lunchy 5556");
		mainShell.setSize(200, 400);
		mainShell.setLocation(300, 300);
		mainShell.setLayout(new RowLayout(SWT.VERTICAL));
		optionShell.setText("Lunchy");
		optionShell.setSize(200, 400);
		optionShell.setLocation(400, 400);
		optionShell.setLayout(new RowLayout(SWT.VERTICAL));
		
		Button bt1 = new Button(mainShell, SWT.PUSH);
		bt1.setText("Press Me");
		bt1.addListener (SWT.Selection, new Listener () {
			public void handleEvent (Event event) {
				optionShell.open();
			}
		});
						
		mainShell.open();
		
		
		while (!mainShell.isDisposed ()) {
			if (!display.readAndDispatch ()) display.sleep ();
		}
		display.dispose ();
	}
}